package com.tongji.housediy.controller.goodsCMD
{
	import com.tongji.housediy.events.goodsEvent.CollectionAdminEvent;
	import com.tongji.housediy.service.GoodsService;
	
	import org.robotlegs.mvcs.Command;
	
	/**
	 * 
	 * @author frank
	 * 2011/09/02
	 */
	public class AddCollectionCommand extends Command
	{
		[Inject]
		public var event:CollectionAdminEvent;
		[Inject]
		public var service:GoodsService;
		public function AddCollectionCommand()
		{
			super();
		}
		public override function execute():void
		{
			switch(event.type)
			{
				case CollectionAdminEvent.ADD_COLLECTIONS:
					service.addACollection(event.collection);
					break;
			}
		}
	}
}